package cn.kgc.chlm.entity;

public class Order {
    private Integer id;
    private Integer userId;             //点餐用户id
    private Integer menuId;             //菜品id
    private Integer num;                //菜品数量
    private String address;             //送餐地址
    private Double price;               //菜品单价
    private Double countPrice;          //菜品总价

    //为保证多表连接查询中，数据封装，所以设置相关的类的对象
    private User user;
    private Menu menu;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getCountPrice() {
        return countPrice;
    }

    public void setCountPrice(Double countPrice) {
        this.countPrice = countPrice;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Menu getMenu() {
        return menu;
    }

    public void setMenu(Menu menu) {
        this.menu = menu;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", menuId=" + menuId +
                ", num=" + num +
                ", address='" + address + '\'' +
                ", price=" + price +
                ", countPrice=" + countPrice +
                ", user=" + user +
                ", menu=" + menu +
                '}';
    }
}
